package com.bootdo.mall.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import com.bootdo.common.annotation.NotColumn;
import com.bootdo.common.fansheutils.FansheUtils;
import com.bootdo.common.fansheutils.JibenLei;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.haojiangbo.annotation.HapiFeild;


/**
 * 商品
 * 
 * @author haojiangbo
 * @email 2100272728@qq.com
 * @date 2019-10-24 19:42:31
 */
 @JsonInclude(JsonInclude.Include.NON_NULL)
public class MallGood extends JibenLei {
	@NotColumn
	private static final long serialVersionUID = 1L;
	
	
	//id
	 @NotColumn 	@HapiFeild("id")
	private Long id;
	
	//价格
		@HapiFeild("价格")
	private String name;
	
	//价格
		@HapiFeild("价格")
	private Double price;
	
	//单位
		@HapiFeild("单位")
	private String unit;
	
	//图片
		@HapiFeild("图片")
	private String pic;
	
	//商品库ID
		@HapiFeild("商品库ID")
	private Long goodFactoryId;
	
	//商品库名称
		@HapiFeild("商品库名称")
	private String goodFactoryName;
	
	//是否上架
		@HapiFeild("是否上架")
	private Integer isShow;
	
	//
		@HapiFeild("")
	private Long userId;
	
	//
		@HapiFeild("")
	private String userName;
	
	//酒店ID
		@HapiFeild("酒店ID")
	private Long hotelId;
	
	//酒店名字
		@HapiFeild("酒店名字")
	private String hotelName;
	
	//分类ID
		@HapiFeild("分类ID")
	private Long categoryId;
	
	//分类名字
		@HapiFeild("分类名字")
	private String categoryName;
	
	//创建时间
		@HapiFeild("创建时间")
	private Date createTime;

	//库存
	private Integer stock;

	@NotColumn
	private Integer goodCartNum;
	@NotColumn
	private Double totalPrice;
	@NotColumn
	private Double totalIntegral;
	@NotColumn
	private Long  specsId;
	@NotColumn
	private Integer  isSelect;
	//积分字段不需要 影射到数据库
	@NotColumn
	private Double integral;
	@NotColumn
	private List<GoodSpecs> goodSpecs = new ArrayList<>();
	//销量
	@NotColumn
	private Integer salesNum;




	//返回积分
	private Double returnIntegral;



	private Long merchantId;

	//供应商ID和名字
	private String merchantName;





	//运费
	private Double freightMoney;

	/**
	 * 备注
	 */
	private String context;



	private Integer px;

    public MallGood(){
    	this.stock = 0;
    	this.isShow = 0;
    	this.pic = "";
    	this.goodCartNum = 0;
    	this.createTime = new Date();
    	this.totalPrice = 0d;
    	this.context = "";
    	this.returnIntegral = 0d;
    	this.merchantName = "";
    	this.merchantId = -1l;
    	this.freightMoney = 0d;
    	this.salesNum = 0;
    	this.integral = 0d;
    	this.totalIntegral = 0d;
    	this.specsId = -1l;
    	this.isSelect = 1;
    	this.px = 0;
    }

	public Integer getPx() {
		return px;
	}

	public void setPx(Integer px) {
		this.px = px;
	}

	public Integer getIsSelect() {
		return isSelect;
	}

	public void setIsSelect(Integer isSelect) {
		this.isSelect = isSelect;
	}

	public Long getSpecsId() {
		return specsId;
	}

	public void setSpecsId(Long specsId) {
		this.specsId = specsId;
	}

	public Double getTotalIntegral() {
		return totalIntegral;
	}

	public void setTotalIntegral(Double totalIntegral) {
		this.totalIntegral = totalIntegral;
	}

	public List<GoodSpecs> getGoodSpecs() {
		return goodSpecs;
	}

	public void setGoodSpecs(List<GoodSpecs> goodSpecs) {
		this.goodSpecs = goodSpecs;
	}

	public Double getIntegral() {
		return integral;
	}

	public void setIntegral(Double integral) {
		this.integral = integral;
	}

	public Integer getSalesNum() {
		return salesNum;
	}

	public void setSalesNum(Integer salesNum) {
		this.salesNum = salesNum;
	}

	public Double getFreightMoney() {
		return freightMoney;
	}

	public void setFreightMoney(Double freightMoney) {
		this.freightMoney = freightMoney;
	}

	public Long getMerchantId() {
		return merchantId;
	}

	public void setMerchantId(Long merchantId) {
		this.merchantId = merchantId;
	}

	public String getMerchantName() {
		return merchantName;
	}

	public void setMerchantName(String merchantName) {
		this.merchantName = merchantName;
	}

	public Double getReturnIntegral() {
		return returnIntegral;
	}

	public void setReturnIntegral(Double returnIntegral) {
		this.returnIntegral = returnIntegral;
	}

	public String getContext() {
		return context;
	}

	public void setContext(String context) {
		this.context = context;
	}

	public Double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(Double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public Integer getGoodCartNum() {
		return goodCartNum;
	}

	public void setGoodCartNum(Integer goodCartNum) {
		this.goodCartNum = goodCartNum;
	}

	public Integer getStock() {
		return stock;
	}

	public void setStock(Integer stock) {
		this.stock = stock;
	}

	/**
	 * 设置：id
	 */
	public void setId(Long id) {
		this.id = id;
	}
	/**
	 * 获取：id
	 */
	public Long getId() {
		return id;
	}
	/**
	 * 设置：价格
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * 获取：价格
	 */
	public String getName() {
		return name;
	}
	/**
	 * 设置：价格
	 */
	public void setPrice(Double price) {
		this.price = price;
	}
	/**
	 * 获取：价格
	 */
	public Double getPrice() {
		return price;
	}
	/**
	 * 设置：单位
	 */
	public void setUnit(String unit) {
		this.unit = unit;
	}
	/**
	 * 获取：单位
	 */
	public String getUnit() {
		return unit;
	}
	/**
	 * 设置：图片
	 */
	public void setPic(String pic) {
		this.pic = pic;
	}
	/**
	 * 获取：图片
	 */
	public String getPic() {
		return pic;
	}
	/**
	 * 设置：商品库ID
	 */
	public void setGoodFactoryId(Long goodFactoryId) {
		this.goodFactoryId = goodFactoryId;
	}
	/**
	 * 获取：商品库ID
	 */
	public Long getGoodFactoryId() {
		return goodFactoryId;
	}
	/**
	 * 设置：商品库名称
	 */
	public void setGoodFactoryName(String goodFactoryName) {
		this.goodFactoryName = goodFactoryName;
	}
	/**
	 * 获取：商品库名称
	 */
	public String getGoodFactoryName() {
		return goodFactoryName;
	}
	/**
	 * 设置：是否上架
	 */
	public void setIsShow(Integer isShow) {
		this.isShow = isShow;
	}
	/**
	 * 获取：是否上架
	 */
	public Integer getIsShow() {
		return isShow;
	}
	/**
	 * 设置：
	 */
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	/**
	 * 获取：
	 */
	public Long getUserId() {
		return userId;
	}
	/**
	 * 设置：
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}
	/**
	 * 获取：
	 */
	public String getUserName() {
		return userName;
	}
	/**
	 * 设置：酒店ID
	 */
	public void setHotelId(Long hotelId) {
		this.hotelId = hotelId;
	}
	/**
	 * 获取：酒店ID
	 */
	public Long getHotelId() {
		return hotelId;
	}
	/**
	 * 设置：酒店名字
	 */
	public void setHotelName(String hotelName) {
		this.hotelName = hotelName;
	}
	/**
	 * 获取：酒店名字
	 */
	public String getHotelName() {
		return hotelName;
	}
	/**
	 * 设置：分类ID
	 */
	public void setCategoryId(Long categoryId) {
		this.categoryId = categoryId;
	}
	/**
	 * 获取：分类ID
	 */
	public Long getCategoryId() {
		return categoryId;
	}
	/**
	 * 设置：分类名字
	 */
	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}
	/**
	 * 获取：分类名字
	 */
	public String getCategoryName() {
		return categoryName;
	}
	/**
	 * 设置：创建时间
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	/**
	 * 获取：创建时间
	 */
	public Date getCreateTime() {
		return createTime;
	}


	@Override
	@JsonIgnore
	public List<HashMap<String, Object>> getFields() {
		// TODO Auto-generated method stub
		return FansheUtils.getFieldList(this);
	}


}
